# 方法1
apple = 1
day = 1
while day < 10:
    apple = (apple+1)*2
    day += 1

print(apple)

# 方法2
n = 1
for i in range(1, 10):
    total = (n+1)*2
    n = total

print(n)